﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="map_in.aspx.cs" Inherits="map_in" %>

<%@ Register Assembly="aspnetpager" Namespace="Wuqi.Webdiyer" TagPrefix="Webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">   
     <script type="text/javascript">
         $(document).ready(function () {

             odd_even(".Map-Detail", "Map-sob01", "Map-sob02");
         });
         function odd_even(id, odd, even) {
             $(id).find("tr").each(function (index, element) {
                 if (index != 0) {
                     $(this).find("td").each(function (tdIndex, element) {
                         console.log("tdIndex = " + tdIndex);
                         if (index % 2 == 1) {
                             if (tdIndex == 3 || tdIndex == 4) {
                                 $(this).addClass(odd + "a");
                             }
                             else {
                                 $(this).addClass(odd);
                             }
                         }
                         else {
                             if (tdIndex == 3 || tdIndex == 4) {
                                 $(this).addClass(even + "a");
                             }
                             else {
                                 $(this).addClass(even);
                             }
                         }
                     });
                 }
             });
         } 
    </script> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <div id="AllOb-Table">
    <div id="AllTitle">各地學堂訊息</div>
    <div id="All-Stitle">
        <asp:Literal ID="ltlArea" runat="server"></asp:Literal>（<asp:Literal ID="ltlCount" runat="server"></asp:Literal>）</div>
    <table border="0" cellpadding="0" cellspacing="0" class="Map-Detail">
      <thead>      
        <td width="62" class="Map-title01">縣市</td>
        <td width="131" class="Map-title01">單位名稱</td>
        <td width="227" class="Map-title01">聯絡資訊</td>
        <td width="90" class="Map-title01">開課情形</td>
      </thead>
        <asp:Repeater ID="RepeaterList" runat="server" OnItemDataBound="RepeaterList_ItemDataBound">
            <ItemTemplate>
                <tr>
        <td align="center" ><asp:Literal ID="ltlCity" runat="server" Text=''></asp:Literal></td>
        <td><asp:Literal ID="ltlTitle" runat="server" Text='<%# Bind("Title") %>'></asp:Literal></td>
        <td>電話：<asp:Literal ID="ltlPhone" runat="server" Text='<%# Bind("Phone") %>'></asp:Literal> 
            <br />
                        連絡人：<asp:Literal ID="ltlContactName" runat="server" Text='<%# Bind("ContactName") %>'></asp:Literal><br />
            地址：<asp:Literal ID="ltlAddress" runat="server" Text='<%# Bind("Address") %>'></asp:Literal></td>
        <td><asp:Literal ID="ltlType" runat="server" Text=''></asp:Literal></td>
      </tr>
            </ItemTemplate>
        </asp:Repeater>      
    </table>
    <div id="NumberPage">
                <Webdiyer:AspNetPager ID="AspNetPager1" runat="server"
                    OnPageChanged="AspNetPager1_PageChanged" PageIndexBoxType="TextBox" PageSize="10"
                    ShowPageIndexBox="Never" ShowFirstLast="false" PrevPageText="上一頁" NextPageText="下一頁" />                
                </div> 
  </div> 
</asp:Content>

